import { createStore } from 'vuex'

export default createStore({
  state: {
    counter: 99
  },
  getters: {
    counterFixed: (state) => state.counter.toFixed(10)
  },
  mutations: {
    SET_COUNTER(state, data) {
      state.counter += data
    }
  },
  actions: {
    updateCounter(context, data) {
      context.commit("SET_COUNTER", data)
    }
  },
  modules: {
  }
})
